<% if @property %>
<div id="content1">
  
    <span class="sub_title">2.添加商品扩展属性</span>
    <div class="form">

      <% form_tag :action => 'update_properties' do %>
        <% i = 0 %>
        <% for @property in @properties %>
          <% i+=1 %>
          <p>
            <label for="property_<%=i%>_value" ><%=@property.name%></label>
            <input id="property_<%=i%>_value" name="property[<%=i%>][value]" ></input>
            <input id="property_<%=i%>_property_id" name="property[<%=i%>][property_id]" value="<%=@property.id%>" type="hidden"></input>
            <input id="property_<%=i%>_product_id" name="property[<%=i%>][product_id]" value="<%=params[:id]%>"  type="hidden"></input>
          </p>
        <% end  %>
        <%= submit_tag "創建",:class=>"submit" %>
      <% end %>
   
  </div>
</div>
<%  end %>

<div class="link_button">
  <%= link_to 'Back', products_path %>
</div>
